<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<fmt:setBundle basename="ApplicationMessage" />
<fmt:setLocale value="zh_CN" />

<!DOCTYPE html>
<html lang="zh-CN">
<head>

  <%@ include file="/WEB-INF/include/meta.jsp"%>
  <%@ include file="/WEB-INF/include/css.jsp"%>
  
  <link href="${ctx.resource}/css/shiftform.css" rel="stylesheet">
  <link href="${ctx.resource}/css/select2.css" rel="stylesheet">
  <link href="${ctx.resource}/css/select2-bootstrap.css" rel="stylesheet">
  
  <title></title>

</head>

<body>

  <%@ include file="/WEB-INF/include/header.jsp"%>

  <%@ include file="/WEB-INF/include/menu.jsp"%>

  <div class="container main-content">

    <div class="panel panel-default beast-panel beast-panel-layout">

      <div class="panel-heading">
        <ol class="breadcrumb">
          <li><a href="${ctx.host}/adusers">广告主管理</a></li>
          <li class="active">质检退款数据</li>
        </ol>
      </div>

      <div class="panel-body">

        <div class="col-xs-2 beast-panel-layout-left no-horizontal-padding">
          <%@ include file="/WEB-INF/include/submenu.jsp"%>
        </div>

        <div class="col-xs-10 beast-panel-layout-right">

          <div class="beast-breadcrumb-wrapper">
            <div class="beast-breadcrumb clearfix">
              <h2><i class="glyphicon glyphicon-fire" title="质检退款数据"></i>&nbsp;&nbsp;<span>质检退款数据&nbsp;-&nbsp;退款审核列表</span></h2>
            </div>
          </div>         
          
          <div class="beast-breadcrumb-wrapper clearfix">
              
            <ul class="nav nav-pills beast-breadcrumb-nav">
              <li class="pull-left ${status eq 'AUDITING' ? 'active': ''}"><a href="${ctx.host}/aduser-refunds?status=AUDITING">待审核</a></li>
              <li class="pull-left ${status eq 'PAID' ? 'active': ''}"><a href="${ctx.host}/aduser-refunds?status=PAID">已打款</a></li>
              <li class="pull-left ${empty status ? 'active': ''}"><a href="${ctx.host}/aduser-refunds?status=">全部</a></li>
            </ul>
            
          </div>
          
          <table class="table table-striped table-hover demo2do-table bottom-margin-20">
            <thead>
              <tr>
                <th>广告主</th>
                <th>广告名称</th>
                <th>退款金额</th>
                <th>状态</th>
                <th>添加时间</th>
                <c:if test="${ status eq 'AUDITING' }">
                	<th>操作</th>
                </c:if>
              </tr>
            </thead>
            <tbody>
            	<c:forEach var="aduserRefund" items="${aduserRefunds}">
              	<tr>
                	<td>${aduserRefund.advertisement.aduser.profile.userName}</td>
                	<td>${aduserRefund.advertisement.adTitle}</td>
                	<td>${aduserRefund.balance/100}元</td>
                	<td><span class="label label-${aduserRefund.refundStatus.css}">${aduserRefund.refundStatus.description}</span></td>
                	<td><fmt:formatDate value="${aduserRefund.createTime}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
                	<c:if test="${ status eq 'AUDITING' }">
	               		<td>
	               			<a href="${ctx.host}/aduser-refunds/${aduserRefund.id}/audit" data-toggle="modal" data-target="#">审核</a>               		
	                	</td>
                	</c:if>
              	</tr> 
            	</c:forEach>        	
            </tbody>
          </table>
          
          <c:choose>
            <c:when test="${not empty queryString}">
              <jsp:include page="/WEB-INF/include/page.jsp">
                <jsp:param name="url" value="adusers/search" /> 
                <jsp:param name="queryString" value="${queryString}" />
              </jsp:include>
            </c:when>
            <c:otherwise>
              <jsp:include page="/WEB-INF/include/page.jsp">
                <jsp:param name="url" value="aduser-refunds" />
              </jsp:include>
            </c:otherwise>
          </c:choose>
          
        </div>
        
      </div>
      
    </div>

  </div>

  <%@ include file="/WEB-INF/include/footer.jsp"%>
  <%@ include file="/WEB-INF/include/script.jsp"%>
  <script src="${ctx.resource}/js/shiftform.js"></script>
  <script src="${ctx.resource}/js/select2.min.js"></script>
  <script src="${ctx.resource}/js/select2_locale_zh-CN.js"></script>
</body>

</html>
